using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;

namespace MiGuava
{
    public partial class ucSkills : ucGridView
    {
        public ucSkills()
        {
            InitializeComponent();            

            GRD.AutoGenerateColumns = false;            
            GRD.AllowUserToResizeRows = false;

            GRD.AllowUserToAddRows = true;

            mnuEdit.Enabled = false;
            mnuNew.Enabled = false;

            mnuEdit.Visible = false;
            mnuNew.Visible = false;
        }

        public override void InitData()
        {
            GRD.Columns.Clear();

            this.DataSource = m_GanttControl.Skills;            

            // Text
            DataGridViewTextBoxColumn txtText = new DataGridViewTextBoxColumn();
            txtText.DataPropertyName = "Text";
            txtText.Name = "Text";
            txtText.HeaderText = Properties.Resources.ColumnHeader_Text;
            txtText.Width = 360;            
            GRD.Columns.Add(txtText);            

            // Description
            DataGridViewTextBoxColumn txtDescription = new DataGridViewTextBoxColumn();
            txtDescription.DataPropertyName = "Description";
            txtDescription.Name = "Description";
            txtDescription.HeaderText = Properties.Resources.ColumnHeader_Description;
            txtDescription.Width = 480;
            GRD.Columns.Add(txtDescription);            

            EnableControls();
        }        
    }
}
